package temp.lho.lws.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import temp.lho.lws.mapper.IBaseMapper;
import temp.lho.lws.mapper.WarrantyInfoMapper;
import temp.lho.lws.pojo.WarrantyInfo;
import temp.lho.lws.service.IWarrantyInfoService;

import java.util.List;

/**
 * (WarrantyInfo)表服务实现类
 *
 * @author makejava
 * @since 2020-07-06 23:15:37
 */
@Service("warrantyInfoService")
public class WarrantyInfoServiceImpl extends BaseServiceImpl<WarrantyInfo> implements IWarrantyInfoService {

    @Autowired
    private WarrantyInfoMapper warrantyInfoMapper;

    @Override
    public List<WarrantyInfo> seleAll(WarrantyInfo warranty) {
        warranty.setPage((warranty.getPage()-1)*warranty.getLimit());
        return warrantyInfoMapper.seleAll(warranty);
    }

    @Override
    public WarrantyInfo queryById() {
        return null;
    }

    @Override
    public List<WarrantyInfo> queryAllByLimit(int offset, int limit) {
        return null;
    }

    @Override
    public Integer getPage() {
        return warrantyInfoMapper.getPage();
    }

    @Override
    public WarrantyInfo insert(WarrantyInfo warrantyInfo) {
        return null;
    }

    @Override
    protected IBaseMapper<WarrantyInfo> baseMapper() {
        return warrantyInfoMapper;
    }

    @Override
    public Integer deleteById(WarrantyInfo warranty) {
        return warrantyInfoMapper.delewarr(warranty);
    }

    @Override
    public Integer updWarr(WarrantyInfo warranty) {
        return warrantyInfoMapper.updwarr(warranty);
    }

    @Override
    public Integer addWarr(WarrantyInfo warranty) {
        return warrantyInfoMapper.addwarr(warranty);
    }

    @Override
    public Integer addWarr2(WarrantyInfo warranty) {
        return warrantyInfoMapper.addwarr2(warranty);
    }

    @Override
    public int selectById(int warrantyId) {
        return warrantyInfoMapper.selectById(warrantyId);
    }

}